﻿$(function () {
    $('#combobox').combobox({
        url: '/configInfo',
        valueField:'configtypevalue',
        textField:'configtypename',
    });

    $("#prepaymentTable").datagrid({
        singleSelect:true,
        fitColumns: true,// 拉宽
        //fit: true,// 拉高度
        url: '/configInfoBy',
        method: 'get',
        loadFilter: function (pageinfo) {
            var prepaymentData = {};
            prepaymentData.total = pageinfo.count;
            prepaymentData.rows = pageinfo.list;
            return prepaymentData;
        },
        pagination: true,// 分页工具
        columns: [[
            {field: 'id', title: '序号', width: 20},
            {field: 'detailtypename', title: '账务类型', width: 100},
            {field: 'money', title: '账务资金', width: 30},
            {field: 'accountmoney', title: '账户余额', width: 40},
            {field: 'memo', title: '备注信息', width: 210},
            {field: 'detaildatetime', title: '明细时间', width: 60}
        ]]
    });
    

});

function searchData() {
    $("#prepaymentTable").datagrid('reload',
        {id: $("#combobox").val(),beginDate: $("#beginDate").val(),endDate: $("#endDate").val()});
}